from logger_setting import log_config
import uvicorn
from fastapi import FastAPI
from app.routes import test_routes, users, permissions

app = FastAPI()
# app = FastAPI(docs_url=None, redoc_url=None)  # 正式环境 关闭 http://127.0.0.1:8000/docs 路由

# 注册APIRouter路由
app.include_router(test_routes.router, tags=["test模块"])
app.include_router(users.router, prefix='/users', tags=["users模块"])
app.include_router(permissions.router, tags=["permissions模块"])


if __name__ == "__main__":
    uvicorn.run(app, host="127.0.0.1", port=8000, log_config=log_config)